home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_ambtr.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  84 lines

  1. # Jones 3D Cog Script
  2. #
  3. # shs_AmbTR.cog
  4. #
  5. # Plays a random sound at random intervals with random volume and panning
  6. #
  7. #
  8. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13.        message        entered
  14.       message     pulse
  15.  
  16.     # By door
  17.     sector      start_Amb1      linkID=1
  18.     sector      stop_Amb1       linkID=0
  19.     # By tunnel
  20.     sector      start_Amb2         linkID=1
  21.     sector      stop_Amb2       linkID=0
  22.     
  23.     thing        soundPos0        nolink
  24.     thing        soundPos1        nolink
  25.     thing        soundPos2        nolink
  26.     thing        soundPos3        nolink
  27.     thing        soundPos4        nolink
  28.     thing        soundPos5        nolink
  29.     thing        soundPos6        nolink
  30.     thing        soundPos7        nolink
  31.     thing        soundPos8        nolink
  32.     thing        soundPos9        nolink
  33.     thing        player            local
  34.  
  35.     sound        ambient0=shs_creaky_a1.wav   local
  36.     sound        ambient1=shs_creaky_a2.wav   local
  37.     sound        ambient2=shs_creaky_a3.wav   local
  38.     sound        ambient3=shs_creaky_a4.wav   local
  39.  
  40.    
  41. end
  42.  
  43. # ========================================================================================
  44.  
  45.  
  46. code
  47.  
  48. # ........................................................................................
  49.  
  50. startup:
  51.     player = GetLocalPlayerThing();
  52.     return;
  53.  
  54. # ........................................................................................
  55.     
  56.     entered:
  57.     
  58.         if(GetSenderID() == 1)
  59.         {
  60.             setpulse(2.0);
  61.         }
  62.         
  63.         if(GetSenderID() == 0)
  64.         {
  65.             setpulse(0.0);
  66.         }
  67.           return;
  68.  
  69. # ========================================================================================
  70.         
  71. pulse:
  72.         
  73.     PlaySoundThing(ambient0[RandBetween(0, 3)], soundPos0[RandBetween(0, 9)], 1, 4, 20, 0);
  74.     return;
  75.         
  76. # ========================================================================================
  77.         
  78.         
  79.  
  80. end
  81.     
  82.     
  83.  
  84.